var app = getApp();

Page({
    data: {},
    onLoad: function(t) {
        console.log(t), app.setNavigationBarColor(this), app.getSystem(this), app.getUrl(this);
        this.setData({
            activity_id: t.id,
            options: t
        });
    },
    edit_activity: function(t) {
        wx.navigateTo({
            url: "../fabu/fabu?id=" + this.data.activity_id
        });
    },
    close_activity: function(t) {
        var i = this, o = i.data.activity_id, a = i.data.options.is_close, n = i.data.options;
        console.log(n), a = 1 == a ? 2 : 1, app.util.request({
            url: "entry/wxapp/CloseActivity",
            cachetime: "0",
            data: {
                activity_id: o,
                is_close: a
            },
            success: function(t) {
                console.log(t), wx.showToast({
                    title: "操作成功"
                }), setTimeout(function() {
                    n.is_close = a, i.setData({
                        options: n
                    });
                }, 1500);
            }
        });
    },
    ticket_manage: function(t) {
        var i = this.data.activity_id;
        wx.navigateTo({
            url: "piaoquan?activity_id=" + i
        });
    },
    mine_income: function(t) {
        var i = this.data.activity_id;
        wx.navigateTo({
            url: "../mycenter/myshouru?income=1&activity_id=" + i
        });
    },
    see_write_off_code: function(t) {
        wx.showModal({
            title: "",
            content: this.data.options.hx_code
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});